One of the objects which seems to crop up rather often when discussing this idea, is that

My users are now dependant on a CDN!

This is true, although my invesigtaion makes this appear way less scary then it first looks. In fact on balance I've developed a strong preference for them...

The reliability concern is dealt with in two ways. Firstly according to jsdelivr status, it's uptime was 100% in 2023. So, that's not too bad.

And if you specifiy the explicit dependance of the module you are using... actually, it gets waaaay better ... because when the CDN responds to an explicitly versioned request, it includes a bunch of headers which say "This artifact is immutable. Don't bother me about this again. Ever".

And the browser wqill respect that - next time you go ask for your dependancy, it simply loads it out of it's cache. There is no network request. Dependancy load time : 0ms, according to the browser network tools.

It's tought to get faster than 0. Also, no request means no netork risk.

So, under "ideal" conditions:

  • You are using a modern browser
  • You are making the request for a second+ time
  • You have explicitly specified the version of the dependancies you're using

Dependancy resolution is both very reliable and very fast. What's cool - that cache survives redeployment. So your app is slow for the user the first time... but the cache survives a redeployment. It's fast afterwards. We can reword the statment as follows;

My users are now dependant on a CDN being available the first time they visit my site.

Which is less scary given the historical uptime!